<?php 

Class ModuleDailySummaryFilters extends CmsModule {
    public function __init()
    {
		$this->title = 'Daily Automated Executive Summary Report';
		$this->id = 'daily-summary';
		
		$modDate = new CmsDatePicker();
		$modDate->name = 'date';
		$modDate->label = 'Date';
		$modDate->bind = 'daily_date';
		
		$fieldset1 = new CmsFieldset();
		$fieldset1->title = 'Date';
		$fieldset1->addAll(array($modDate));
		
		$button = new CmsButton();
        $button->name = 'submit';
        $button->label = 'Submit';
        $button->type = 'button';
		
		$form = new CmsForm();
		$form->name = 'filter-form';
		$form->action='daily_summary_result.html';
		$form->addAll(array(
			$fieldset1, $button
		));
		
		$sep = new CmsSeparator();
		
		$jqjosn = json_encode(AC::$jq_email);
		
		$fieldset2 = new CmsFieldset();
		$fieldset2->initTarget['custom_cssclass'] = 'daily-email';
		$fieldset2->title = 'Subscription Email';
		$fieldset2->target['program'] = '<table id="email-list" class="scroll" ></table><div id="email-pager" class="scroll" ></div><input id="emailjson" type="hidden" value=\''.$jqjosn.'\' />';
		
		
		$jg = new CmsJqGrid();
        $jg->config = AC::$jq_cfg;
		
		$fieldset3 = new CmsFieldset();
		$fieldset3->title = 'Archive';
		$fieldset3->addAll(array($jg));
		
		$this->setBlock('top', $form);
		$this->setBlock('main', $fieldset2);
		//$this->setBlock('foot', $fieldset3);
    }
	
}
?>